import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    state: {
        //登录状态
        isSignIn: 0,
        token: sessionStorage.getItem('token') || ""
    },
    mutations: {
        changIsSignIn(state, n) {
            state.isSignIn = n;
        },
        setToken(state, val) {
            state.token = val;
            sessionStorage.setItem('token', val)
        },
    },
    actions: {},
    modules: {},

})